import java.util.Objects;

class Person{

    public String id;
    public Person(String id) {
        this.id = id;
    }
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(id, person.id);
    }
    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
public class Test {
    public static void main(String[] args) {
        Person person1=new Person("1234");
        Person person2=new Person("1234");

        HushBuck2<Person,String> hushBuck2=new HushBuck2<>();

        hushBuck2.push(person1,"XiaoLei");
        System.out.println(hushBuck2.getVal(person2));

//        System.out.println(person1.hashCode());
//        System.out.println(person2.hashCode());
//
//        System.out.println(person1.equals(person2));
    }
    public static void main1(String[] args) {
        HashBuck hashBuck=new HashBuck();
        hashBuck.push(1,9);
        hashBuck.push(11,9);
        hashBuck.push(14,9);
        hashBuck.push(4,8);
        hashBuck.push(2,9);
        hashBuck.push(15,9);
        hashBuck.push(6,9);
        hashBuck.push(5,9);
        int val= hashBuck.getVal(4);
        System.out.println(val);
    }
}
